//
//  XYPlayerViewController.m
//  XYSfxyxuSwift
//
//  Created by 许洋 on 2018/4/9.
//  Copyright © 2018年 许洋. All rights reserved.
//

#import "XYPlayerViewController.h"
#import "TEPlayerManager.h"
@interface XYPlayerViewController ()

@end

@implementation XYPlayerViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    self.edgesForExtendedLayout = UIRectEdgeNone;
    self.view.backgroundColor = [UIColor whiteColor];
    UIView *view = [[UIView alloc]init];
    [self.view addSubview:view];
    [view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.right.top.equalTo(self.view);
        make.height.mas_equalTo(XYScreenWidth*2/3);
    }];
    ZFPlayerView *playerView = [TEPlayerManager createPlayerView];
    ZFPlayerModel *model = [[ZFPlayerModel alloc]init];
    model.videoURL = [NSURL URLWithString:@"http://120.25.226.186:32812/resources/videos/minion_01.mp4"];
//    model.videoURL = [NSURL URLWithString:@"https://czm001.oss-cn-beijing.aliyuncs.com/123.mp4"];
    model.fatherView = view;
    [TEPlayerManager playerModel:model];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
